home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- // MODIFY THIS AT YOUR OWN RISK
- //
- // Creation Date: 13 April 1997
- // Author: gf
- //
- //
- // Procedure Name:
- // AniConstraintsMenu
- //
- // Description:
- // Create the ANIMATION->Constraints menu
- //
- // Input Arguments:
- // parent to parent the menu to.
- //
- // Return Value:
- // None.
- //
-
- global proc AniConstraintsMenuAddPoleVector( string $parent )
- //
- // Description:
- // A proc to add the poleVectorConstraint to the AniConstraints menu.
- // This does not check for the existance of the poleVectorConstraint
- // menu item.
- //
- // This proc will only get called after AniConstraintsMenu, therefore
- // this proc will exist when it is needed.
- //
- // initialKinUI.mel depends on the menu item having poleVectorConstraint
- // in its name.
- {
- setParent -m $parent;
-
- if (`exists ikSystem` != 0) {
- menuItem -divider true;
- menuItem -l "Pole Vector"
- -annotation "Pole Vector Constraint: Select one or more targets followed by the Rotate Plane ikHandle to constrain"
- -dmc "performPoleVectorConstraint 2"
- -c "PoleVectorConstraint"
- -i "poleVectorConstraint.xpm"
- poleVectorConstraintItem;
- menuItem -optionBox true
- -annotation "Pole Vector Constraint Option Box"
- -l "Pole Vector Option Box"
- -c "PoleVectorConstraintOptions"
- -i "poleVectorConstraint.xpm"
- poleVectorConstraintOptionItem;
- }
- }
-
- global proc AniConstraintsMenu( string $parent )
- {
- setParent -m $parent;
- if( `menu -q -ni $parent` != 0 ) {
- //
- // Menu is built already - just return
- //
- return;
- }
-
- menuItem -l "Point"
- -annotation "Point Constraint: Select one or more targets followed by the object to constrain"
- -dmc "performPointConstraint 2"
- -c "PointConstraint"
- -i "posConstraint.xpm"
- pointConstraintItem;
- menuItem -optionBox true
- -annotation "Point Constraint Option Box"
- -l "Point Option Box"
- -i "posConstraint.xpm"
- -c "PointConstraintOptions"
- pointConstraintOptionItem;
-
- menuItem -l "Aim"
- -annotation "Aim Constraint: Select one or more targets followed by the object to constrain"
- -dmc "performAimConstraint 2"
- -c "AimConstraint"
- -i "aimConstraint.xpm"
- aimConstraintItem;
- menuItem -optionBox true
- -annotation "Aim Constraint Option Box"
- -l "Aim Option Box"
- -c "AimConstraintOptions"
- -i "aimConstraint.xpm"
- aimConstraintOptionItem;
-
- menuItem -l "Orient"
- -annotation "Orient Constraint: Select one or more targets followed by the object to constrain"
- -dmc "performOrientConstraint 2"
- -c "performOrientConstraint 0"
- -i "orientConstraint.xpm"
- orientConstraintItem;
- menuItem -optionBox true
- -annotation "Orient Constraint Option Box"
- -l "Orient Option Box"
- -c "OrientConstraintOptions"
- -i "orientConstraint.xpm"
- orientConstraintOptionItem;
-
- menuItem -l "Scale"
- -annotation "Scale Constraint: Select one or more targets followed by the object to constrain"
- -dmc "performScaleConstraint 2"
- -c "ScaleConstraint"
- -i "scaleConstraint.xpm"
- scaleConstraintItem;
- menuItem -optionBox true
- -annotation "Scale Constraint Option Box"
- -l "Scale Option Box"
- -c "ScaleConstraintOptions"
- -i "scaleConstraint.xpm"
- scaleConstraintOptionItem;
-
- menuItem -l "Parent"
- -annotation "Parent Constraint: Select one or more targets followed by the object to constrain"
- -dmc "performParentConstraint 2"
- -c "ParentConstraint"
- -i "parentConstraint.xpm"
- parentConstraintItem;
- menuItem -optionBox true
- -annotation "Parent Constraint Option Box"
- -l "Parent Option Box"
- -c "ParentConstraintOptions"
- -i "parentConstraint.xpm"
- parentConstraintOptionItem;
-
- menuItem -divider true;
-
- menuItem -l "Geometry"
- -annotation "Geometry Constraint: Select one or more targets followed by the object to constrain"
- -dmc "performGeometryConstraint 2"
- -c "GeometryConstraint"
- -i "geometryConstraint.xpm"
- geometryConstraintItem;
- menuItem -optionBox true
- -annotation "Geometry Constraint Option Box"
- -l "Geometry Option Box"
- -i "geometryConstraint.xpm"
- -c "GeometryConstraintOptions"
- geometryConstraintOptionItem;
-
- menuItem -l "Normal"
- -annotation "Normal Constraint: Select one or more targets followed by the object to constrain"
- -dmc "performNormalConstraint 2"
- -c "performNormalConstraint 0"
- -i "normalConstraint.xpm"
- normalConstraintItem;
- menuItem -optionBox true
- -annotation "Normal Constraint Option Box"
- -l "Normal Option Box"
- -i "normalConstraint.xpm"
- -c "NormalConstraintOptions"
- normalConstraintOptionItem;
-
- menuItem -l "Tangent"
- -annotation "Tanget Constraint: Select one or more targets followed by the object to constrain"
- -dmc "performTangentConstraint 2"
- -c "TangetConstraint"
- -i "tangentConstraint.xpm"
- tangentConstraintItem;
- menuItem -optionBox true
- -annotation "Tanget Constraint Option Box"
- -l "Tanget Option Box"
- -i "tangentConstraint.xpm"
- -c "TangetConstraintOptions"
- tangentConstraintOptionItem;
-
- AniConstraintsMenuAddPoleVector($parent);
-
- menuItem -divider true;
-
- menuItem -l "Remove Target"
- -annotation "Remove Target: Select target to remove followed by the constrained object."
- -dmc "performRemoveConstraintTarget 2"
- -c "RemoveConstraintTarget"
- removeConstraintTargetItem;
- menuItem -optionBox true
- -annotation "Remove Constraint Target Option Box"
- -l "Remove Constraint Target Option Box"
- -c "RemoveConstraintTargetOptions"
- removeConstraintTargetOptionItem;
-
- menuItem -l "Set Rest Position"
- -annotation "Set Rest Position: Select constrained object."
- -c "setConstraintRestPosition"
- setRestPositionItem;
-
- menuItem -l "Modify Constrained Axis..."
- -annotation "Modify Constrained Axis: Select constrained object."
- -dmc "performModifyConstraintAxes 2"
- -c "ModifyConstraintAxisOptions"
- modifyConstraintAxisItem;
- }
-